﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DeliveryService
{
    public class BLGoodsCategory
    {
        public List<MGoodsCategorys> GetGoodsCategorys()
        {
            using (DeliveryDBDataContext db = new DeliveryDBDataContext())
            {
                var query = db.GoodsCategories
                            .Select(s => new MGoodsCategorys
                                     {
                                         Id = s.GoodsCategory_ID,
                                         CategoryName = s.GoodsCategory_Name
                                     });
                return query.ToList();
            }
        }


    }
}